<html><!-- Created using the cpp_pretty_printer from the dlib C++ library.  See http://dlib.net for updates. --><head><title>dlib C++ Library - string.cpp</title></head><body bgcolor='white'><pre>
<font color='#009900'>// Copyright (C) 2007  Davis E. King (davis@dlib.net)
</font><font color='#009900'>// License: Boost Software License   See LICENSE.txt for the full license.
</font>

<font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>sstream<font color='#5555FF'>&gt;</font>
<font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>string<font color='#5555FF'>&gt;</font>
<font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>cstdlib<font color='#5555FF'>&gt;</font>
<font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>ctime<font color='#5555FF'>&gt;</font>
<font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>dlib<font color='#5555FF'>/</font>string.h<font color='#5555FF'>&gt;</font>

<font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='tester.h.html'>tester.h</a>"

<font color='#0000FF'>namespace</font>  
<b>{</b>
    <font color='#0000FF'>using</font> <font color='#0000FF'>namespace</font> test;
    <font color='#0000FF'>using</font> <font color='#0000FF'>namespace</font> dlib;
    <font color='#0000FF'>using</font> <font color='#0000FF'>namespace</font> std;

    logger <b><a name='dlog'></a>dlog</b><font face='Lucida Console'>(</font>"<font color='#CC0000'>test.string</font>"<font face='Lucida Console'>)</font>;


    <font color='#0000FF'><u>void</u></font> <b><a name='string_test'></a>string_test</b> <font face='Lucida Console'>(</font>
    <font face='Lucida Console'>)</font>
    <font color='#009900'>/*!
        ensures
            - runs tests on string functions for compliance with the specs 
    !*/</font>
    <b>{</b>        

        <font color='#BB00BB'>print_spinner</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>;

        string a <font color='#5555FF'>=</font> "<font color='#CC0000'>  davis  </font>";
        string A <font color='#5555FF'>=</font> "<font color='#CC0000'>  DAVIS  </font>";
        string empty <font color='#5555FF'>=</font> "<font color='#CC0000'>    </font>";

        dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LTRACE <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#979000'>1</font>;

        <font color='#0000FF'><u>double</u></font> dval;
        <font color='#0000FF'><u>int</u></font> ival;
        <font color='#0000FF'><u>bool</u></font> bval;

        <font color='#BB00BB'>DLIB_TEST_MSG</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>5</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>5</font>,string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>5</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST_MSG</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>0x5</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>5</font>,string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>0x5</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST_MSG</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>0xA</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>10</font>,string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>0xA</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>float</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>0.5</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>0.5</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font face='Lucida Console'>(</font>dval <font color='#5555FF'>=</font> sa <font color='#5555FF'>=</font>"<font color='#CC0000'>0.5</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>0.5</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font>std::string<font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>0.5 !</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>0.5 !</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>bool</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>true</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>true</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font face='Lucida Console'>(</font>bval <font color='#5555FF'>=</font> sa <font color='#5555FF'>=</font> "<font color='#CC0000'>true</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>true</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>bool</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>false</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>false</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>bool</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>TRUE</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>true</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>bool</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>FALSE</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>false</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font face='Lucida Console'>(</font>bval <font color='#5555FF'>=</font> sa <font color='#5555FF'>=</font> "<font color='#CC0000'>FALSE</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>false</font><font face='Lucida Console'>)</font>;

        dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LTRACE <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#979000'>2</font>;

        <font color='#BB00BB'>DLIB_TEST_MSG</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>5</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>5</font>,string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>5</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST_MSG</font><font face='Lucida Console'>(</font><font face='Lucida Console'>(</font>ival <font color='#5555FF'>=</font> sa <font color='#5555FF'>=</font> L"<font color='#CC0000'>5</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>5</font>,string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>5</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LTRACE <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#979000'>2.1</font>;
        <font color='#BB00BB'>DLIB_TEST_MSG</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>0x5</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>5</font>,string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>0x5</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST_MSG</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>0xA</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>10</font>,string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>0xA</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>float</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>0.5</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>0.5</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font>std::string<font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>0.5 !</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>0.5 !</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>bool</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>true</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>true</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>bool</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>false</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>false</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>bool</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>TRUE</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>true</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font face='Lucida Console'>(</font>bval <font color='#5555FF'>=</font> sa <font color='#5555FF'>=</font> L"<font color='#CC0000'>TRUE</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>true</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>bool</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>FALSE</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>false</font><font face='Lucida Console'>)</font>;

        dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LTRACE <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#979000'>3</font>;

        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>cast_to_string</font><font face='Lucida Console'>(</font><font color='#979000'>5</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>5</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>cast_to_string</font><font face='Lucida Console'>(</font><font color='#979000'>5.5</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>5.5</font>"<font face='Lucida Console'>)</font>;

        dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LTRACE <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#979000'>4</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>cast_to_wstring</font><font face='Lucida Console'>(</font><font color='#979000'>5</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>5</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>cast_to_wstring</font><font face='Lucida Console'>(</font><font color='#979000'>5.5</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>5.5</font>"<font face='Lucida Console'>)</font>;
        dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LTRACE <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#979000'>5</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>toupper</font><font face='Lucida Console'>(</font>a<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> A<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>toupper</font><font face='Lucida Console'>(</font>A<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> A<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>tolower</font><font face='Lucida Console'>(</font>a<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> a<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>tolower</font><font face='Lucida Console'>(</font>A<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> a<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>trim</font><font face='Lucida Console'>(</font>a<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>ltrim</font><font face='Lucida Console'>(</font>a<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis  </font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>rtrim</font><font face='Lucida Console'>(</font>a<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>  davis</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>trim</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font>wstring<font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>a<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>ltrim</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font>wstring<font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>a<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>davis  </font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>rtrim</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font>wstring<font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>a<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>  davis</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>trim</font><font face='Lucida Console'>(</font>a, "<font color='#CC0000'> </font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>ltrim</font><font face='Lucida Console'>(</font>a, "<font color='#CC0000'> </font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis  </font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>rtrim</font><font face='Lucida Console'>(</font>a, "<font color='#CC0000'> </font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>  davis</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>trim</font><font face='Lucida Console'>(</font>empty<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>ltrim</font><font face='Lucida Console'>(</font>empty<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>rtrim</font><font face='Lucida Console'>(</font>empty<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>trim</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font>wstring<font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>empty<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>ltrim</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font>wstring<font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>empty<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>rtrim</font><font face='Lucida Console'>(</font>string_cast<font color='#5555FF'>&lt;</font>wstring<font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font>empty<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>trim</font><font face='Lucida Console'>(</font>empty, "<font color='#CC0000'> </font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>ltrim</font><font face='Lucida Console'>(</font>empty, "<font color='#CC0000'> </font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>rtrim</font><font face='Lucida Console'>(</font>empty, "<font color='#CC0000'> </font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;


        dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LTRACE <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#979000'>6</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>lpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>wstring</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>     davis</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>rpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>wstring</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>davis     </font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>pad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>wstring</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font>  L"<font color='#CC0000'>  davis   </font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 

        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>lpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#5555FF'>-</font><font color='#979000'>10</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>rpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#5555FF'>-</font><font color='#979000'>10</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>pad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#5555FF'>-</font><font color='#979000'>10</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>lpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>     davis</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>rpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis     </font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>pad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font>  "<font color='#CC0000'>  davis   </font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>lpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, <font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>*</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>*****davis</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>rpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, <font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>*</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis*****</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>pad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, <font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>*</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>**davis***</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>lpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, <font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>_-</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>_-_-_davis</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>rpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, <font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>_-</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis_-_-_</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>pad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, <font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>_-</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>_-davis_-_</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>lpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, <font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>willy wanka</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>willydavis</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>rpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, <font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>willy wanka</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>daviswilly</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>pad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, <font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>willy wanka</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>widaviswil</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>lpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, "<font color='#CC0000'>*</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>*****davis</font>"<font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>rpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, "<font color='#CC0000'>*</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis*****</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>pad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, "<font color='#CC0000'>*</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>**davis***</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>lpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, "<font color='#CC0000'>_-</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>_-_-_davis</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>rpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, "<font color='#CC0000'>_-</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>davis_-_-_</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>pad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, "<font color='#CC0000'>_-</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>_-davis_-_</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>lpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, "<font color='#CC0000'>willy wanka</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>willydavis</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>rpad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, "<font color='#CC0000'>willy wanka</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>daviswilly</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>pad</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>davis</font>"<font face='Lucida Console'>)</font>, <font color='#979000'>10</font>, "<font color='#CC0000'>willy wanka</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>widaviswil</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; 
        dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LTRACE <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#979000'>7</font>;

        a <font color='#5555FF'>=</font> "<font color='#CC0000'>file.txt</font>";
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>left_substr</font><font face='Lucida Console'>(</font>a,<font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>file</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>left_substr</font><font face='Lucida Console'>(</font>a,"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>file</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>right_substr</font><font face='Lucida Console'>(</font>a,<font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>txt</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>right_substr</font><font face='Lucida Console'>(</font>a,"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>txt</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;

        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>left_substr</font><font face='Lucida Console'>(</font>a,"<font color='#CC0000'> </font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>file.txt</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>right_substr</font><font face='Lucida Console'>(</font>a,"<font color='#CC0000'> </font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;

        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>left_substr</font><font face='Lucida Console'>(</font>a,"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>file.txt</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>right_substr</font><font face='Lucida Console'>(</font>a,"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;

        wstring ws <font color='#5555FF'>=</font> L"<font color='#CC0000'>file.txt</font>";
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>left_substr</font><font face='Lucida Console'>(</font>ws,<font color='#BB00BB'>wstring</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>file</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST_MSG</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>left_substr</font><font face='Lucida Console'>(</font>ws,L"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>file</font>"<font face='Lucida Console'>)</font>, L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>right_substr</font><font face='Lucida Console'>(</font>ws,<font color='#BB00BB'>wstring</font><font face='Lucida Console'>(</font>L"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>txt</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST_MSG</font><font face='Lucida Console'>(</font> <font face='Lucida Console'>(</font><font color='#BB00BB'>right_substr</font><font face='Lucida Console'>(</font>ws,L"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>txt</font>"<font face='Lucida Console'>)</font>, L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;


        dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LTRACE <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#979000'>8</font>;
        <b>{</b>
            ostringstream sout;
            <font color='#0000FF'><u>wchar_t</u></font> w <font color='#5555FF'>=</font> <font color='#979000'>85</font>;
            <font color='#0000FF'><u>char</u></font> c <font color='#5555FF'>=</font> <font color='#979000'>4</font>;
            <font color='#BB00BB'>serialize</font><font face='Lucida Console'>(</font>w,sout<font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>serialize</font><font face='Lucida Console'>(</font>c,sout<font face='Lucida Console'>)</font>;
            w <font color='#5555FF'>=</font> <font color='#0000FF'>static_cast</font><font color='#5555FF'>&lt;</font><font color='#0000FF'><u>wchar_t</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font><font color='#5555FF'>-</font><font color='#979000'>1</font><font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>serialize</font><font face='Lucida Console'>(</font>w,sout<font face='Lucida Console'>)</font>;
            c <font color='#5555FF'>=</font> <font color='#0000FF'>static_cast</font><font color='#5555FF'>&lt;</font><font color='#0000FF'><u>char</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font><font color='#5555FF'>-</font><font color='#979000'>1</font><font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>serialize</font><font face='Lucida Console'>(</font>c,sout<font face='Lucida Console'>)</font>;

            istringstream <font color='#BB00BB'>sin</font><font face='Lucida Console'>(</font>sout.<font color='#BB00BB'>str</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
            w <font color='#5555FF'>=</font> <font color='#979000'>0</font>;
            c <font color='#5555FF'>=</font> <font color='#979000'>0</font>;
            <font color='#BB00BB'>deserialize</font><font face='Lucida Console'>(</font>w,sin<font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>deserialize</font><font face='Lucida Console'>(</font>c,sin<font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>w <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>85</font><font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>c <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>4</font><font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>deserialize</font><font face='Lucida Console'>(</font>w,sin<font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>deserialize</font><font face='Lucida Console'>(</font>c,sin<font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>w <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#0000FF'>static_cast</font><font color='#5555FF'>&lt;</font><font color='#0000FF'><u>wchar_t</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font><font color='#5555FF'>-</font><font color='#979000'>1</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>c <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#0000FF'>static_cast</font><font color='#5555FF'>&lt;</font><font color='#0000FF'><u>char</u></font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font><font color='#5555FF'>-</font><font color='#979000'>1</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;

            wstring str <font color='#5555FF'>=</font> L"<font color='#CC0000'>test string</font>";

            sout.<font color='#BB00BB'>str</font><font face='Lucida Console'>(</font>"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>serialize</font><font face='Lucida Console'>(</font>str, sout<font face='Lucida Console'>)</font>;
            sin.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>;
            sin.<font color='#BB00BB'>str</font><font face='Lucida Console'>(</font>sout.<font color='#BB00BB'>str</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
            str <font color='#5555FF'>=</font> L"<font color='#CC0000'>something else</font>";
            <font color='#BB00BB'>deserialize</font><font face='Lucida Console'>(</font>str,sin<font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>str <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>test string</font>"<font face='Lucida Console'>)</font>;
        <b>}</b>
    <b>}</b>


    <font color='#0000FF'><u>void</u></font> <b><a name='test_split'></a>test_split</b><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>
    <b>{</b>
        std::vector<font color='#5555FF'>&lt;</font>string<font color='#5555FF'>&gt;</font> v;

        string str;
        string delim <font color='#5555FF'>=</font> "<font color='#CC0000'> , </font>";

        v <font color='#5555FF'>=</font> <font color='#BB00BB'>split</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>one, two,three four</font>"<font face='Lucida Console'>)</font>,"<font color='#CC0000'> ,</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>4</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>0</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>one</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>1</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>two</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>2</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>three</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>3</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>four</font>"<font face='Lucida Console'>)</font>;

        v <font color='#5555FF'>=</font> <font color='#BB00BB'>split</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>one, two,three four</font>"<font face='Lucida Console'>)</font>,delim<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>4</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>0</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>one</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>1</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>two</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>2</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>three</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>3</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>four</font>"<font face='Lucida Console'>)</font>;

        v <font color='#5555FF'>=</font> <font color='#BB00BB'>split</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>0</font><font face='Lucida Console'>)</font>;

        v <font color='#5555FF'>=</font> <font color='#BB00BB'>split</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>   </font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>0</font><font face='Lucida Console'>)</font>;

        v <font color='#5555FF'>=</font> <font color='#BB00BB'>split</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'> one two  </font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>2</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>0</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>one</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>1</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>two</font>"<font face='Lucida Console'>)</font>;

        v <font color='#5555FF'>=</font> <font color='#BB00BB'>split</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'> one   </font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>1</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>0</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>one</font>"<font face='Lucida Console'>)</font>;

        v <font color='#5555FF'>=</font> <font color='#BB00BB'>split</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>one</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>1</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>0</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>one</font>"<font face='Lucida Console'>)</font>;

        v <font color='#5555FF'>=</font> <font color='#BB00BB'>split</font><font face='Lucida Console'>(</font><font color='#BB00BB'>string</font><font face='Lucida Console'>(</font>"<font color='#CC0000'>o</font>"<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>1</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>v[<font color='#979000'>0</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>o</font>"<font face='Lucida Console'>)</font>;


        std::vector<font color='#5555FF'>&lt;</font>wstring<font color='#5555FF'>&gt;</font> wv;
        wstring wstr <font color='#5555FF'>=</font> L"<font color='#CC0000'>test string</font>";
        wv <font color='#5555FF'>=</font> <font color='#BB00BB'>split</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>wv.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>2</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>wv[<font color='#979000'>0</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>test</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>wv[<font color='#979000'>1</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>string</font>"<font face='Lucida Console'>)</font>;
        wv <font color='#5555FF'>=</font> <font color='#BB00BB'>split</font><font face='Lucida Console'>(</font>wstr,L"<font color='#CC0000'> </font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>wv.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>2</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>wv[<font color='#979000'>0</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>test</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>wv[<font color='#979000'>1</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>string</font>"<font face='Lucida Console'>)</font>;

        wstr <font color='#5555FF'>=</font> L"<font color='#CC0000'>Über alle Maßen\u00A0Öttingenstraße</font>";
        wv <font color='#5555FF'>=</font> <font color='#BB00BB'>split</font><font face='Lucida Console'>(</font>wstr, L"<font color='#CC0000'> \u00A0\n\r\t</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>wv.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>4</font><font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>wv[<font color='#979000'>0</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>Über</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>wv[<font color='#979000'>1</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>alle</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>wv[<font color='#979000'>2</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>Maßen</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>wv[<font color='#979000'>3</font>] <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>Öttingenstraße</font>"<font face='Lucida Console'>)</font>;

        wstr <font color='#5555FF'>=</font> L"<font color='#CC0000'>test string hah</font>";
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>test</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>string hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr,L"<font color='#CC0000'>#</font>"<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>test string hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr,L"<font color='#CC0000'>#</font>"<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>test string</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>wstr,L"<font color='#CC0000'>#</font>"<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>test string hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>wstr,L"<font color='#CC0000'>#</font>"<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        wstr <font color='#5555FF'>=</font> L"<font color='#CC0000'></font>";
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;

        str <font color='#5555FF'>=</font> "<font color='#CC0000'>test string hah</font>";
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>test</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>string hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str,"<font color='#CC0000'>#</font>"<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>test string hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str,"<font color='#CC0000'>#</font>"<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>test string</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>str,"<font color='#CC0000'>#</font>"<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>test string hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>str,"<font color='#CC0000'>#</font>"<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        str <font color='#5555FF'>=</font> "<font color='#CC0000'></font>";
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;

        wstr <font color='#5555FF'>=</font> L"<font color='#CC0000'>test.string.hah</font>";
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr,L"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>test</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr,L"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>string.hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>test.string.hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>wstr,L"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>test.string</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>wstr,L"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'>test.string.hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        wstr <font color='#5555FF'>=</font> L"<font color='#CC0000'></font>";
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>wstr<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> L"<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;

        str <font color='#5555FF'>=</font> "<font color='#CC0000'>test.string.hah</font>";
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str,"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>test</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str,"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>string.hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>test.string.hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>str,"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>test.string</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>str,"<font color='#CC0000'>.</font>"<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'>test.string.hah</font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_last</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        str <font color='#5555FF'>=</font> "<font color='#CC0000'></font>";
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.first <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
        <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>split_on_first</font><font face='Lucida Console'>(</font>str<font face='Lucida Console'>)</font>.second <font color='#5555FF'>=</font><font color='#5555FF'>=</font> "<font color='#CC0000'></font>"<font face='Lucida Console'>)</font>;
    <b>}</b>



    <font color='#0000FF'>class</font> <b><a name='string_tester'></a>string_tester</b> : <font color='#0000FF'>public</font> tester
    <b>{</b>
    <font color='#0000FF'>public</font>:
        <b><a name='string_tester'></a>string_tester</b> <font face='Lucida Console'>(</font>
        <font face='Lucida Console'>)</font> :
            tester <font face='Lucida Console'>(</font>"<font color='#CC0000'>test_string</font>",
                    "<font color='#CC0000'>Runs tests on the string objects and functions.</font>"<font face='Lucida Console'>)</font>
        <b>{</b><b>}</b>

        <font color='#0000FF'><u>void</u></font> <b><a name='perform_test'></a>perform_test</b> <font face='Lucida Console'>(</font>
        <font face='Lucida Console'>)</font>
        <b>{</b>
            <font color='#BB00BB'>string_test</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>;
            <font color='#BB00BB'>test_split</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>;
        <b>}</b>
    <b>}</b> a;

<b>}</b>




</pre></body></html>